<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/10/22
  Time: 20:31
  顶栏的判读登陆组件
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  import="inspur.dao.CookieDao,inspur.entity.User" %>
<html>
<head>

</head>
    <body>
        <%
            User CookieUser=new User();
            CookieUser.setId(CookieDao.getCookieItemValue(request,"userid"));
           if (CookieUser.getId()==null){
                //  cookie==null22
        %>
            <a class="menu_text" href="reg.jsp">注册</a>
            <a class="menu_text" href="login.jsp">登陆</a>

        <%
           }else {

        %>
        <div id="div_top_loginbox">
            <a id="a-top-placeLogin" class="menu_text" href="user.jsp?user=<%=CookieUser.getId().toString()%>">当前用户：<%=CookieUser.getId().toString()%></a>
            <div id="div-top-placeLogin-menu" class="Menu-two"><a class="menu_text" href="signout.jsp">注销</a> </div>
        </div>

        <%
           }
        %>

    </body>
</html>
